package cn.pid21.client.model.excel;

import com.github.crab2died.converter.ReadConvertible;
import com.github.crab2died.utils.DateUtils;
import lombok.SneakyThrows;

import java.util.Date;

/**
 * DateConverter Description
 *
 * @author yaol
 * @version tracing 1.0.0.RELEASE
 * <b>Creation Time:</b> 2020/9/24 18:48
 */
public class DateConverter implements ReadConvertible {
    @SneakyThrows
    @Override
    public Object execRead(String object) {
        Date date = DateUtils.str2Date(object);
        return DateUtils.date2Str(date, DateUtils.DATE_FORMAT_DAY);
    }
}
